package com.xinghanlaser.applet.base.auth.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.xinghanlaser.applet.base.auth.enums.ResourceTypeEnum;
import com.xinghanlaser.applet.base.common.annotation.EnumValidated;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * <p>
 *
 * @author: mftuo 陀铭峰
 * @since: 2024/4/30 11:39
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ResourcePutVO {
    @NotNull(message = "资源ID不能为空")
    private Long id;

    @ApiModelProperty(value = "上级资源ID, 默认为0")
    private Long pid;

    @ApiModelProperty(value = "资源名称")
    private String resourceName;

    @ApiModelProperty(value = "接口URI")
    private String uri;

    @ApiModelProperty(value = "接口请求方法")
    private String requestMethod;

    @ApiModelProperty(value = "资源类型：0 菜单；1 按钮；2 接口")
    @EnumValidated(value = ResourceTypeEnum.class, message = "资源类型值不在枚举中")
    private Integer resourceType;
}
